package com.ohos.volley.toolbox;

import ohos.eventhandler.EventRunner;

final class Threads {
    private Threads() {}

    static void throwIfNotOnMainThread() {
        if (EventRunner.current() != EventRunner.getMainEventRunner()) {
            throw new IllegalStateException("Must be invoked from the main thread.");
        }
    }
}
